home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Programming / yaec / modules / utility.e < prev    next >
Encoding:
Text File  |  2001-08-12  |  5.5 KB  |  87 lines

  1. OPT MODULE
  2. OPT EXPORT
  3. -> Module created with E:bin/fd2module from YAECv18 package.
  4. OPT NDDC
  5. -> --- functions in V36 or higher (Release 2.0) ---
  6. -> 
  7. ->  Tag item functions
  8. -> 
  9. #macro FindTagItem(tagVal,tagList) IS Stores(utilitybase,tagVal,tagList) BUT Loads(A6,D0,A0) BUT ASM ' jsr -30(a6)'
  10. #macro GetTagData(tagValue,defaultVal,tagList) IS Stores(utilitybase,tagValue,defaultVal,tagList) BUT Loads(A6,D0,D1,A0) BUT ASM ' jsr -36(a6)'
  11. #macro PackBoolTags(initialFlags,tagList,boolMap) IS Stores(utilitybase,initialFlags,tagList,boolMap) BUT Loads(A6,D0,A0,A1) BUT ASM ' jsr -42(a6)'
  12. #macro NextTagItem(tagListPtr) IS (A0:=tagListPtr) BUT (A6:=utilitybase) BUT ASM ' jsr -48(a6)'
  13. #macro FilterTagChanges(changeList,originalList,apply) IS Stores(utilitybase,changeList,originalList,apply) BUT Loads(A6,A0,A1,D0) BUT ASM ' jsr -54(a6)'
  14. #macro MapTags(tagList,mapList,mapType) IS Stores(utilitybase,tagList,mapList,mapType) BUT Loads(A6,A0,A1,D0) BUT ASM ' jsr -60(a6)'
  15. #macro AllocateTagItems(numTags) IS (D0:=numTags) BUT (A6:=utilitybase) BUT ASM ' jsr -66(a6)'
  16. #macro CloneTagItems(tagList) IS (A0:=tagList) BUT (A6:=utilitybase) BUT ASM ' jsr -72(a6)'
  17. #macro FreeTagItems(tagList) IS (A0:=tagList) BUT (A6:=utilitybase) BUT ASM ' jsr -78(a6)'
  18. #macro RefreshTagItemClones(clone,original) IS Stores(utilitybase,clone,original) BUT Loads(A6,A0,A1) BUT ASM ' jsr -84(a6)'
  19. #macro TagInArray(tagValue,tagArray) IS Stores(utilitybase,tagValue,tagArray) BUT Loads(A6,D0,A0) BUT ASM ' jsr -90(a6)'
  20. #macro FilterTagItems(tagList,filterArray,logic) IS Stores(utilitybase,tagList,filterArray,logic) BUT Loads(A6,A0,A1,D0) BUT ASM ' jsr -96(a6)'
  21. -> 
  22. ->  Hook functions
  23. -> 
  24. #macro CallHookPkt(hook,object,paramPacket) IS ASM ' movem.l d2-d3/a2-a3,-(a7)' BUT Stores(utilitybase,hook,object,paramPacket) BUT Loads(A6,A0,A2,A1) BUT ASM ' jsr -102(a6)' BUT ASM ' movem.l (a7)+, d2-d3/a2-a3'
  25. -> --- (1 function slot reserved here) ---
  26. -> 
  27. ->  Date functions
  28. -> 
  29. -> --- (1 function slot reserved here) ---
  30. #macro Amiga2Date(seconds,result) IS Stores(utilitybase,seconds,result) BUT Loads(A6,D0,A0) BUT ASM ' jsr -120(a6)'
  31. #macro Date2Amiga(date) IS (A0:=date) BUT (A6:=utilitybase) BUT ASM ' jsr -126(a6)'
  32. #macro CheckDate(date) IS (A0:=date) BUT (A6:=utilitybase) BUT ASM ' jsr -132(a6)'
  33. -> 
  34. ->  32 bit integer muliply functions
  35. -> 
  36. #macro SMult32(arg1,arg2) IS Stores(utilitybase,arg1,arg2) BUT Loads(A6,D0,D1) BUT ASM ' jsr -138(a6)'
  37. #macro UMult32(arg1,arg2) IS Stores(utilitybase,arg1,arg2) BUT Loads(A6,D0,D1) BUT ASM ' jsr -144(a6)'
  38. -> 
  39. ->  32 bit integer division funtions. The quotient and the remainder are
  40. ->  returned respectively in d0 and d1
  41. -> 
  42. #macro SDivMod32(dividend,divisor) IS Stores(utilitybase,dividend,divisor) BUT Loads(A6,D0,D1) BUT ASM ' jsr -150(a6)'
  43. #macro UDivMod32(dividend,divisor) IS Stores(utilitybase,dividend,divisor) BUT Loads(A6,D0,D1) BUT ASM ' jsr -156(a6)'
  44. -> --- functions in V37 or higher (Release 2.04) ---
  45. -> 
  46. ->  International string routines
  47. -> 
  48. #macro Stricmp(string1,string2) IS Stores(utilitybase,string1,string2) BUT Loads(A6,A0,A1) BUT ASM ' jsr -162(a6)'
  49. #macro Strnicmp(string1,string2,length) IS Stores(utilitybase,string1,string2,length) BUT Loads(A6,A0,A1,D0) BUT ASM ' jsr -168(a6)'
  50. #macro ToUpper(character) IS (D0:=character) BUT (A6:=utilitybase) BUT ASM ' jsr -174(a6)'
  51. #macro ToLower(character) IS (D0:=character) BUT (A6:=utilitybase) BUT ASM ' jsr -180(a6)'
  52. -> --- functions in V39 or higher (Release 3) ---
  53. -> 
  54. ->  More tag Item functions
  55. -> 
  56. #macro ApplyTagChanges(list,changeList) IS Stores(utilitybase,list,changeList) BUT Loads(A6,A0,A1) BUT ASM ' jsr -186(a6)'
  57. -> --- (1 function slot reserved here) ---
  58. -> 
  59. ->  64 bit integer muliply functions. The results are 64 bit quantities
  60. ->  returned in D0 and D1
  61. -> 
  62. #macro SMult64(arg1,arg2) IS Stores(utilitybase,arg1,arg2) BUT Loads(A6,D0,D1) BUT ASM ' jsr -198(a6)'
  63. #macro UMult64(arg1,arg2) IS Stores(utilitybase,arg1,arg2) BUT Loads(A6,D0,D1) BUT ASM ' jsr -204(a6)'
  64. -> 
  65. ->  Structure to Tag and Tag to Structure support routines
  66. -> 
  67. #macro PackStructureTags(pack,packTable,tagList) IS ASM ' movem.l d2-d3/a2-a3,-(a7)' BUT Stores(utilitybase,pack,packTable,tagList) BUT Loads(A6,A0,A1,A2) BUT ASM ' jsr -210(a6)' BUT ASM ' movem.l (a7)+, d2-d3/a2-a3'
  68. #macro UnpackStructureTags(pack,packTable,tagList) IS ASM ' movem.l d2-d3/a2-a3,-(a7)' BUT Stores(utilitybase,pack,packTable,tagList) BUT Loads(A6,A0,A1,A2) BUT ASM ' jsr -216(a6)' BUT ASM ' movem.l (a7)+, d2-d3/a2-a3'
  69. -> 
  70. ->  New, object-oriented NameSpaces
  71. -> 
  72. #macro AddNamedObject(nameSpace,object) IS Stores(utilitybase,nameSpace,object) BUT Loads(A6,A0,A1) BUT ASM ' jsr -222(a6)'
  73. #macro AllocNamedObjectA(name,tagList) IS Stores(utilitybase,name,tagList) BUT Loads(A6,A0,A1) BUT ASM ' jsr -228(a6)'
  74. #macro AttemptRemNamedObject(object) IS (A0:=object) BUT (A6:=utilitybase) BUT ASM ' jsr -234(a6)'
  75. #macro FindNamedObject(nameSpace,name,lastObject) IS ASM ' movem.l d2-d3/a2-a3,-(a7)' BUT Stores(utilitybase,nameSpace,name,lastObject) BUT Loads(A6,A0,A1,A2) BUT ASM ' jsr -240(a6)' BUT ASM ' movem.l (a7)+, d2-d3/a2-a3'
  76. #macro FreeNamedObject(object) IS (A0:=object) BUT (A6:=utilitybase) BUT ASM ' jsr -246(a6)'
  77. #macro NamedObjectName(object) IS (A0:=object) BUT (A6:=utilitybase) BUT ASM ' jsr -252(a6)'
  78. #macro ReleaseNamedObject(object) IS (A0:=object) BUT (A6:=utilitybase) BUT ASM ' jsr -258(a6)'
  79. #macro RemNamedObject(object,message) IS Stores(utilitybase,object,message) BUT Loads(A6,A0,A1) BUT ASM ' jsr -264(a6)'
  80. -> 
  81. ->  Unique ID generator
  82. -> 
  83. #macro GetUniqueID() IS (A6:=utilitybase) BUT ASM ' jsr -270(a6)'
  84. -> 
  85. -> --- (4 function slots reserved here) ---
  86. -> 
  87.